# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Contributor: Michael Lass <bevan@bi-co.net>
# Contributor: Michal Krenek (Mikos) <m.krenek@gmail.com>

pkgname=qspectrumanalyzer
pkgver=2.2.0
pkgrel=9
pkgdesc='Spectrum analyzer for multiple SDR platforms.'
arch=('any')
url='https://github.com/xmikos/qspectrumanalyzer'
license=('GPL3')
depends=('python-qt.py' 'python-pyqt5' 'python-pyqtgraph' 'soapy_power')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
optdepends=('rtl-sdr: Alternative backend'
	    'rx_tools: Alternative backend'
	    'hackrf: Alternative backend')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
        'setenv.patch')
sha256sums=('d50e13fa4951a67ed4f56362fb74daff9faeda88d7fc3f9d98cffb8d63c6311d'
            '9205115603abf8c555d4325246f4b57207002cc7037f96a6e9a3a2cfa9d18037')

build() {
  cd $pkgname-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
